<!DOCTYPE html>
<html lang="en">

<head>
    <meta charset="UTF-8">
    <meta http-equiv="X-UA-Compatible" content="IE=edge">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
    <script>
        var num = 1;
        num = num + 1;//2
        num++;
        console.log(num);//3
        ++num;//4
        //先运算后自增
        //console.log(num++ + 1);//5
        //先自增后运算
        console.log(++num + 1);//6
        console.log(num);//5
        num--;
        console.log(num);//4
        --num;
        console.log(num);//3
    </script>
</head>

<body>

</body>

</html>